<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <link rel="stylesheet" href="/js/bootstrap/css/bootstrap.min.css">
    <script src="/js/jquery/jquery.min.js"></script>
    <script src="/js/bootstrap/js/bootstrap.min.js"></script>
    <link rel="stylesheet" href="/css/font/css/font-awesome.min.css"/>
    <link rel="stylesheet" href="/css/reset.css"/>
    <link rel="stylesheet" href="/css/message.css"/>
    <link rel="stylesheet" href="/css/like.css"/>
    <link rel="stylesheet" href="../js/plugins/jquery-confirm/css/jquery-confirm.css">
    <script src="../js/plugins/jquery-confirm/js/jquery-confirm.js"></script>
    <script src="../js/plugins/jrender/jrender.min.js"></script>
    <script src="../js/plugins/dialog2/dialog.min.js"></script>
    <link rel="stylesheet" href="../js/plugins/dialog2/dialog.css">


</head>
<script>
    $(function () {

        var users = sessionStorage.getItem("user");
        var user = JSON.parse(users);
        $.get("/users/" + user.nickName + "/commentMe", function (data) {
            $(".detail").renderValues({"list": data}, {
                setHref: function (ele, val) {
                    $(ele).attr("href",$(ele).attr("href") + val);
                }
            })
            var ids = [];
            ids = $.map(data, function (ele) {
                return ele.id;
            })
            console.log(ids);
            jQuery.ajaxSettings.traditional = true;
            $.ajax({
                type:"PUT",
                url:"/users/updateCommentMe",
                data:{"ids":ids,"AuthorNickName":user.nickName}
            })

        })


    });

</script>
<body>
<div class="search-head">
    <div class="row nav-search">
        <div class="col">
            <a href="javascript:history.go(-1);">
                <span><i class="fa fa-chevron-left"></i></span>
            </a>
        </div>
        <div class="col">
            <span>我收到的评论</span>
        </div>
        <div class="col"></div>
    </div>
</div>
<div class="container">
    <h3 style="color: aquamarine">收到的评论列表:</h3>
    <div class="row detail">
        <div class="col" render-loop="list">
            <div>
            <a href="../userProfiles.html?id=" render-fun="setHref" render-key="list.messages.id">
                <img render-src="list.headImgUrl" class="rounded-circle head-img"/>
                <span render-html="list.commentator.nickName" style="color: blueviolet"></span> </a>在
            <p/>
            <span render-html="list.date" style="color: chartreuse"></span>
            对您进行了评论 内容为:  <span render-html="list.content">  </span>
            <p/>

                <span>快速链接:</span>
                <a href="/mine/travelComment.html?id=" render-fun="setHref" render-key="list.travel.id">
                    <img render-src="list.travel.coverUrl" class="rounded-circle head-img"/>
                    <span render-html="list.travel.title" style="color: blueviolet"></span>
                </a>

            <hr/>
        </div>

        </div>

    </div>
</div>
</body>
</html>